import request from '@/utils/request'

// 查询TB 订单列表
export function listOrder(query) {
  return request({
    url: '/system/order/list',
    method: 'get',
    params: query
  })
}

// 查询 订单详细
export function getOrder(orderId) {
  return request({
    url: '/system/order/orderDetails?orderId=' + orderId,
    method: 'get'
  })
}

// 新增 订单
export function addOrder(data) {
  return request({
    url: '/system/order',
    method: 'post',
    data: data
  })
}

// 修改 订单
export function updateOrder(data) {
  return request({
    url: '/system/order',
    method: 'put',
    data: data
  })
}
// 修改 订单 new
export function editNew(data) {
  return request({
    url: '/system/order/editNew',
    method: 'put',
    data: data
  })
}

// 删除 订单
export function delOrder(id) {
  return request({
    url: '/system/order/' + id,
    method: 'delete'
  })
}



// 订单统计
export function getOrderStatistics(query) {
  return request({
    url: '/system/order/getOrderStatistics',
    method: 'get',
    params: query
  })
}



// 店铺
export function getOption(query) {
  return request({
    url: '/system/store/option',
    method: 'get',
    params: query
  })
}

// 修改订单 是否为刷单
export function editBrushing(data) {
  return request({
    url: '/system/order/editBrushing',
    method: 'put',
    data: data
  })
}
// 批量修改结算
export function expenseAccount(data) {
  return request({
    url: '/system/XsSController/expenseAccount',
    method: 'put',
    data: data
  })
}